/* 组织架构接口 */
import request from '@/utils/request'

// 查询企业部门列表
export const getDepartmentList = () => request({
  url: '/company/department'
})

// 根据ID删除部门接口
export const deleteDepartment = (id) => request({
  method: 'DELETE',
  url: `/company/department/${id}`
})
// 添加部门接口
export const addDepartment = data => request({
  method: 'POST',
  url: '/company/department',
  data
})

// 编辑部门接口
export const updateDepartment = (id, data) => request({
  method: 'put',
  url: `/company/department/${id}`,
  data
})

// 根据ID获取部门详情
export const getDepartments = (id) => request({
  method: 'GET',
  url: `/company/department/${id}`
})
